home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98c.txt / 000067_icon-group-sender _Tue Nov 3 09:09:48 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) with SMTP id JAA10063
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Tue, 3 Nov 1998 09:09:47 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA14547; Tue, 3 Nov 1998 09:09:10 -0700
  7. Date: Mon, 2 Nov 1998 18:48:09 -0600 (CST)
  8. From: Ray Pereda <rpereda@ringer.cs.utsa.edu>
  9. X-Sender: rpereda@pandora
  10. To: Robert Valliant <valliant@hawaii.edu>
  11. Cc: icon-group@optima.CS.Arizona.EDU
  12. Subject: Re: How to read integers and others
  13. In-Reply-To: <m3r9vlohcm.fsf@cera.shaps.hawaii.edu>
  14. Message-Id: <Pine.GSO.3.95.981102184640.14308A-100000@pandora>
  15. Mime-Version: 1.0
  16. Content-Type: TEXT/PLAIN; charset=US-ASCII
  17. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  18. Status: RO
  19.  
  20.  
  21. # Please RTFM, "String Scanning and Pattern Matching" chapter
  22. # in the Icon book, or scanning in one of the many online reference
  23. # documents.
  24. # Also, start by reading http://www.cs.arizona.edu/icon/intro.htm
  25.  
  26. procedure main()
  27.    while line := read() ? {
  28.       tab(upto(&letters))
  29.       word := tab(many(&letters))
  30.  
  31.       tab(upto(&digits))
  32.       num := integer(tab(many(&digits)))
  33.  
  34.       write("number: ", num, " word: ", word)
  35.     }
  36. end
  37.  
  38. -ray
  39.  
  40. On 2 Nov 1998, Robert Valliant wrote:
  41.  
  42. > I have an information retrieval program written in "c" that I would
  43. > like to convert to a web application.
  44. > The indexing portion of the application generates an inverted file of
  45. > the format:
  46. >     word   32-bit integer
  47. >     word   32-bit integer
  48. >         .
  49. >         .
  50. >         .
  51. >     word 32-bit integer
  52. > Can anyone tell me the best way to read these things, using icon? Or
  53. > am I wasting my time in trying?
  54. > thanks
  55. > -- 
  56. > Robert Valliant
  57. > Center for Russia in Asia
  58. > University of Hawaii at Manoa
  59. > valliant@hawaii.edu Fax: 808.956.2682 Tel: 808.956.7814
  60.  
  61.